Field
This invention relates generally to data processing systems and more particularly to controlling starvation of tasks in a multi-task data processing system.
Related Art
Starvation of a lower-priority task in a multi-tasking data processing system occurs when such task does not obtain enough central processing unit (CPU) time or does not obtain any CPU time at all. A task includes an instruction thread. Starvation can be a permanent situation or a temporary situation. The larger a number of tasks that are assigned to a CPU, the greater is the probability that a starvation problem will arise. The longer a lifetime that a task has, the greater is the probability that such task will cause a starvation problem.
In its lifetime, each task may go through different states, such as un-assigned, ready-for-scheduling, executing and accelerating. The ready-for-scheduling state occurs when a task is ready to be scheduled for execution by a CPU. The executing state occurs when the instruction thread associated with a task is executed by the CPU. The accelerating state occurs when a task is performing an operation that does not involve the CPU. When a task is in the accelerating state, the task may relinquish the CPU to another task. A task can transition through more than one state, which transitioning can result in the task going in and coming out of the executing state several times until the task finishes.